package practice.异常练习.关卡三;

import java.util.Random;

public class 案例一 {
    public static void main(String[] args) {
        new Thread(new Add()).start();
        new Thread(new Add()).start();
        new Thread(new Add()).start();


    }
}

class Add implements Runnable {

    @Override
    public void run() {
        Random random = new Random();
        int sum = 0;
        for (int i = 0 ; i < 10 ; i++) {
            sum += random.nextInt(901)+100;
        }
        System.out.println(sum);
    }
}